-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
sqlite: avoid extra copy for large text binds #61580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
sqlite: avoid extra copy for large text binds #61580
Conversation
|
Review requested:
|
ea75fcc to
b7abb6f
Compare
|
Benchmarks (local, macOS, Release build) Compared with base branch (main) Summary:
change primarily improves large text binds; other workloads appear neutral within measurement noise. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61580 +/- ##
==========================================
- Coverage 89.78% 89.77% -0.01%
==========================================
Files 673 673
Lines 203775 203852 +77
Branches 39166 39181 +15
==========================================
+ Hits 182956 183017 +61
- Misses 13139 13153 +14
- Partials 7680 7682 +2
🚀 New features to boost your workflow:
|
92bb01c to
8e4016b
Compare
When binding UTF-8 strings to prepared statements, transfer ownership of malloc-backed Utf8Value buffers to SQLite to avoid an extra copy for large strings. Use sqlite3_bind_blob64() when binding BLOB parameters.
8e4016b to
da58cfd
Compare
|
Hi @cjihrig, @Renegade334 and @mcollina When you have a moment, could you please take a look at this PR and share your feedback? Thanks so much! |
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Summary
Utf8Valuebuffer to SQLite to avoid an extra copy for larger strings.sqlite3_bind_blob64()for BLOB parameters to avoid truncation for larger payloads.